package com.laoluo.erp.service.impl;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import com.laoluo.erp.dao.OrdersLogisticsDAO;
import com.laoluo.erp.domain.OrdersLogistics;
import com.laoluo.erp.service.OrdersLogisticsService;
import com.laoluo.erp.util.PageListData;

@Service
public class OrdersLogisticsServiceImpl implements OrdersLogisticsService {

	private OrdersLogisticsDAO dao;

	@Resource(name="ordersLogisticsDAOImpl")
	public void setDao(OrdersLogisticsDAO dao){
		this.dao = dao;
	}

	public void save(OrdersLogistics ordersLogistics){
		dao.save(ordersLogistics);
	}

	public void delete(OrdersLogistics ordersLogistics){
		dao.delete(ordersLogistics);
	}

	public void delete(Integer id) {
		dao.delete(OrdersLogistics.class,id);
	}

	public void update(OrdersLogistics ordersLogistics){
		dao.update(ordersLogistics);
	}

	public OrdersLogistics findById(Integer id) {
		return dao.findById(OrdersLogistics.class, id);
	}

	public List<OrdersLogistics> findAll() {
		return dao.findAll(OrdersLogistics.class);
	}

	@SuppressWarnings({ "rawtypes", "unchecked" })
	public PageListData queryPage(Map param, int start, int limit,int page) {
		param.put("start", start); 
		param.put("limit", limit);
		return dao.queryPage(OrdersLogistics.class, param, start,limit,page);
	}
}
